package user.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import system.mapper.SysUserDao;
import system.shiro.password.JesPasswordServiceImpl;
import user.entity.User;
import user.mapper.UserMapper;
import user.service.UserService;

import java.util.List;

/**
 * @author Yang
 * @Date 2019/8/7 19:22
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Autowired
    private SysUserDao sysUserDao;

    @Autowired
    private JesPasswordServiceImpl jesPasswordService;

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

    @Override
    public User findById(String id) {
        return userMapper.findById(id);
    }

    @Override
    public List<User> findByName(String name) {
        return userMapper.findByName(name);
    }

    @Override
    public int register(User user) {
        return userMapper.register(user);
    }

    @Override
    public int forgetPwd(String password) {
        return userMapper.forgetPwd(password);
    }
}
